package com.ruoyi.crm.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.crm.domain.CrmFeeApply;
import com.ruoyi.crm.domain.CrmOrderCollectPayMoney;
import com.ruoyi.crm.strategy.CrmOrderFlowStrategy;

/**
 * 费用申请Service接口
 *
 * @author yanwenliang
 * @date 2024-10-28
 */
public interface ICrmFeeApplyService extends IService<CrmFeeApply>, CrmOrderFlowStrategy<CrmFeeApply>
{
    /**
     * 查询费用申请
     *
     * @param applyId 费用申请主键
     * @return 费用申请
     */
    public CrmFeeApply selectCrmFeeApplyByApplyId(String applyId);

    /**
     * 查询费用申请列表
     *
     * @param crmFeeApply 费用申请
     * @return 费用申请集合
     */
    public List<CrmFeeApply> selectCrmFeeApplyList(CrmFeeApply crmFeeApply);

    /**
     * 新增费用申请
     *
     * @param crmFeeApply 费用申请
     * @return 结果
     */
    public int insertCrmFeeApply(CrmFeeApply crmFeeApply);

    /**
     * 修改费用申请
     *
     * @param crmFeeApply 费用申请
     * @return 结果
     */
    public int updateCrmFeeApply(CrmFeeApply crmFeeApply);

    /**
     * 批量删除费用申请
     *
     * @param applyIds 需要删除的费用申请主键集合
     * @return 结果
     */
    public int deleteCrmFeeApplyByApplyIds(String[] applyIds);

    /**
     * 删除费用申请信息
     *
     * @param applyId 费用申请主键
     * @return 结果
     */
    public int deleteCrmFeeApplyByApplyId(String applyId);

    /**
     * 提交
     * @param crmFeeApply
     * @return
     */
    int submit(CrmFeeApply crmFeeApply);

    /**
     * 撤回提交
     * @param crmFeeApply
     * @return
     */
    int cancelInfo(CrmFeeApply crmFeeApply);

    /**
     * 审核
     * @param crmFeeApply
     * @return
     */
    int audit(CrmFeeApply crmFeeApply);

    /**
     * 通过商机id和创建人或者归属人查询费用信息
     * @param orderId
     * @return
     */
    List<CrmFeeApply> selectCrmFeeApplyByOrderIdAndCreateBy(String orderId);
}
